1. Field of the Invention
The present invention relates to a printer control apparatus, and more particularly to a printer control apparatus controlling an interface in a system connected with printers so that centronics printers having different specifications can be controlled.
2. Description of the Related Art
The standard of the centronics interface has not yet fixed so that various types can be allowed in development. Thus, now, the centronics interface is widely applied to various fields, such as fields of workstation and personal computer.
FIG. 1 shows signal lines generally used in the centronics interface. Referring to FIG. 1, a host apparatus 10 has an interface controller 11. The interface controller 11 is connected with a printer 12 by a printer cable 13. The printer cable 13 includes a data signal line {circle around (1)} and other signal lines {circle around (2)}-{circle around (8)} which are used to indicate states of the printer 12. Each of signals to which a mark * is added has a value of xe2x80x9c0xe2x80x9d in an active state. In general, the signal lines {circle around (2)}-{circle around (8)} indicate states of a specific printer. The respective signal lines indicate the following states. In many cases, either a BUSY signal or an ACK signal is used.
SLCT indicates that the printer is in an on-line state (xe2x80x9c1xe2x80x9d in the on-line state);
FULT indicates that the printer is in an off-line state (xe2x80x9c1xe2x80x9d in the off-line state);
PE indicates that the printer is in a state where there is no paper (xe2x80x9c1xe2x80x9d in a no paper state);
PRDY indicates a state of a power supply of the printer (xe2x80x9c1xe2x80x9d in an on state);
BUSY indicates that the printer is receiving data (xe2x80x9c1xe2x80x9d in a data receiving state); and
ACK indicates that the printer has received data (xe2x80x9c1xe2x80x9d in a completed data reception state).
In the centronics interface, only the above signals may be defined. Meanings assigned to the signal lines depend on printers of respective manufacturers. Various control methods are used for printers of the respective manufacturers.
Thus, even if printers are based on the standard of the centronics, a single control program for the centronics interface may not correctly recognize states of the different types of printers.
For example, the xe2x80x9con-linexe2x80x9d state, the xe2x80x9coff-linexe2x80x9d state, the xe2x80x9cno paperxe2x80x9d state and the xe2x80x9cpower supply offxe2x80x9d state are defined as states of a printer, and signals SELECT, *FAULT, PE and PRD (hereinafter the signals are referred to as centro-signals) are varied as shown in FIG. 2A. In this case, the centronics interface control program supporting the above printer can recognize the states of the printer based on relationships between operating state values and the states of the printer as shown in FIG. 2B.
However, in a case of a printer for which relationships between operating state values and the states of the printer are formed as shown in FIG. 2C, the above centronics interface control program can not correctly recognize the states of the printer.
Since, as has been described above, various types of control methods are used for the centronics interface, every time a system is developed, an interface program for the system supporting a printer is developed.
That is, conventionally, it is necessary to change the centronics interface control program to support a printer in which sentro-signal lines may have different operating state values.
As shown in FIG. 3, in case of a system in which a centronics interface control program 1 is installed, in order to connect the system with a printer which is not supported by the control program 1, the control program 1 must be changed to a new centronics interface control program 2 which is developed to support the printer.
Therefore, the cost for the development of the control program is increased. In addition, in a case where the control program is changed to the new centronics interface control program 2, the previous printer is not used. Users use only limited types of printers supported by a single centronics interface control program.
Accordingly, a general object of the present invention is to provide a printer control apparatus in which the disadvantages of the aforementioned prior art are eliminated.
A specific object of the present invention is to provide a printer control apparatus capable of supporting different types of printers in which operating state values of the centro signal lines differ from each other.
The above objects of the present invention are achieved by a printer control apparatus comprising: a data table storing operating state values, of signal lines connected to a printer, corresponding to each of states in which the printer is to be maintained; recognizing means for comparing actual operating state values of the signal lines connected to the printer and the operating state values stored in the data table and recognizing a state of the printer based on a comparison result; and means for controlling the printer based on a recognition result obtained by the recognizing means.
According to the present invention, by only rewriting contents of the data table, another type of printer can be controlled. In a case where the printer control apparatus is implemented using a control program, another type of printer can be controlled without changing the control program. Thus, a system (the control program) which can control various types of printers can be developed without consideration of all the types of printers.
Contents of the data table may be set in accordance with a command from an application program. In this case, by user operations applying the application program, the apparatus can support a new type of printer.
In addition, the printer apparatus may further comprises storage means for storing relationships between identification information items identifying a plurality of printers and a plurality of sets of operating state values of signal lines to be connected to the plurality of printers, each sets of the plurality of operating state values corresponding to one of the plurality of printers; and setting means for, when a printer is specified using an identification information item, for selecting a set of operating values corresponding to a printer specified using the identification information from among the plurality of sets of operating state values in the storage means and setting the selected set of operating values in the data table.
In this case, by only specifying an identification information item corresponding to a new type of printer, the apparatus can control the new type of printer with reference to the data table.